//
//  ChartSocketLogger.m
//  Chart
//
//  Created by Herbert Dai on 15/1/14.
//
//

#import "ChartSocketLogger.h"

static BOOL isLogging = NO;

void chartSocketLog(NSString *fmt,...)
{
    va_list args;
    va_start(args, fmt);
    if(isLogging)
    {
        NSString * message = [[NSString alloc] initWithFormat:fmt arguments:args];
        NSLog(@"%@", message);
    }
    va_end(args);
}

void showChartSocketLog() {
    isLogging = YES;
}

void hideChartSocketLog() {
    isLogging = NO;
}
